/**
 * \file Ray.h
 * \brief Ray definition class
 * \author Edouard ROGE
 * \date 7 juin 2012
 */

#ifndef _RAY_
#define _RAY_

#include "Point3D.h"
#include "Vector3D.h"

namespace Math
{
	namespace M3D
	{
		/**
		 * \class Ray
		 * \brief class to instantiate a Ray, composed with a 3D Point and a 3D Vector
		 */
		class Ray : public Core::Memory::HeapObject
		{
		public:
			/**
			 * \fn Ray();
			 * \brief Default constructor
			 */
			Ray();

			/**
			 * \fn Ray(const Point3f & _origin, const Vector3f & _direction);
			 * \param _origin origin of the ray
			 * \param _direction direction of the ray
			 * \brief Constructor with parameters
			 */
			Ray(const Point3f & _origin, const Vector3f & _direction);

			/**
			 * \fn Ray(const Ray & _ray);
			 * \param _ray Ray to copy
			 * \brief Copy constructor
			 */
			Ray(const Ray & _ray);

			/**
			 * \fn ~Ray();
			 * \brief Destructor
			 */
			~Ray();

			/**
			 * \fn void Set(const Point3f & _origin, const Vector3f & _direction);
			 * \param _origin new ray's origin
			 * \param _direction new ray's direction
			 * \brief Set new values to the ray
			 */
			void Set(const Point3f & _origin, const Vector3f & _direction);

			/**
			 * \fn void SetOrigin(const Point3f & _origin);
			 * \param _origin new ray's origin
			 * \brief Set new origin to the ray
			 */
			void SetOrigin(const Point3f & _origin);

			/**
			 * \fn void SetDirection(const Vector3f & _direction);
			 * \param _direction new ray's direction
			 * \brief Set new direction to the ray
			 */
			void SetDirection(const Vector3f & _direction);

			/**
			 * \fn const Point3f & GetOrigin() const;
			 * \return the ray origin
			 * \brief Get the ray origin
			 */
			const Point3f & GetOrigin() const;

			/**
			 * \fn const Vector3f & GetDirection() const;
			 * \return the ray direction
			 * \brief Get the ray direction
			 */
			const Vector3f & GetDirection() const;


		private:

			/** Ray's origin in 3D-space */
			Point3f 	m_Origin;

			/** Ray's direction in 3D-space*/
			Vector3f	m_Direction;
		};
	}
}

#endif // _RAY_
